<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .cricle {
            width: 100px;
            height: 50px;
            background: pink;
            border-radius: 100px / 50px;
            cursor: pointer;
        }

        .sanjiao {
            height: 0px;
            width: 0px;
            border: 10px solid transparent;
            border-bottom: 10px solid red;
        }

        .line {
            width: 100px;
            height: 1px;
            transform: scale(1, 0.5);
            background-color: pink;
        }
    </style>
</head>

<body>
    <div class="cricle" id="abc"></div>
    <div class="sanjiao"></div>
    <div class="line"></div>
    <script>
        const arr = [9, 8, 7, 6, 8, 1, 4, 5, 6, 3, 2, 5, 9]
        const data = [...new Set(arr)]
        console.log(arr, 'arr')
        data.sort((a, b) => a - b)
        function search(arr, total) {
            let result = []
            const data = [...new Set(arr)]
            data.sort((a, b) => a - b)
            let i = 0, j = data.length - 1
            console.log(data, 'data')
            while (i < j) {
                if (data[i] + data[j] > total) {
                    j--
                } else if (data[i] + data[j] < total) {
                    i++
                } else {
                    result = [data[i], data[j]]
                    j--
                    i++
                    break
                }
            }
            return result
        }
        console.log(search(arr, 5))
    </script>
</body>

</html>